<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <script type="text/javascript">
            function doPopupWindow(source) {
                popupwindow = window.open("", "popupwindow", "height=600,width=800,left=200,top=100,toolbar=no,menubar=no,scrollbars=yes,location=no");
                popupwindow.focus;
                document.getElementById("hidden:go").onclick(null);
            }
        </script>
        <style type="text/css">
            .input-col-m {
                width: 80px;
            }

            .input-col-l {
                width: 80px;
            }

            .input-col-xxl {
                width: 1%;
                text-align: right;
            }

            .col-80 {
            }

            .col-20 {
                width: 5%;
            }
        </style>

    </ui:define>

    <ui:define name="content">
        <div style="margin:5px;">
            <p:messages id="msgs" showDetail="false"/>
            <h:form id="form">
                <div id="header">
                    <p:panel header="核对账务信息">
                        <h:panelGrid columns="2" cellspacing="5" columnClasses="col-80,col-20">
                            <h:panelGrid columns="4" cellspacing="5"
                                         columnClasses="input-col-m,input-col-l,input-col-m,input-col-l">
                                <h:outputLabel value="金额:"/>
                                <h:inputText id="actname" size="30" value="#{payVchMngAction.payVoucher.amt}"/>
                                <h:outputLabel value="资金用途:"/>
                                <h:inputText id="actno" size="30" value="#{payVchMngAction.payVoucher.amt}"/>
                                <h:outputLabel value="业务流水号:"/>
                                <h:inputText id="acttype" size="30" value="#{payVchMngAction.payVoucher.amt}"/>
                            </h:panelGrid>
                            <h:panelGrid>
                                <p:commandButton id="qrybtn" style="width:80px;" value="核对"
                                                 action="#{actinfoMngAction.onQuery}"
                                                 update="pdt,msgs">
                                </p:commandButton>
                            </h:panelGrid>
                        </h:panelGrid>
                    </p:panel>
                </div>

                <p:ajaxStatus style="height:20px;text-align:center">
                    <f:facet name="start">
                        <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                    </f:facet>
                    <f:facet name="complete">
                        <h:outputText value=""/>
                    </f:facet>
                </p:ajaxStatus>

                <p:dataTable id="qrypdt" dynamic="true"
                             value="#{payVchMngAction.detlList}" var="record"
                             paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                             paginator="true" rows="15" paginatorPosition="bottom"
                             rowsPerPageTemplate="100,50,30,15,5"
                             emptyMessage="数据记录为空...">
                    <ui:include src="common/payVoucherList.xhtml">
                        <ui:param name="backBean" value="#{payVchMngAction}"/>
                    </ui:include>
                </p:dataTable>
            </h:form>
        </div>
        <h:form id="hidden" target="popupwindow">
            <h:commandLink id="go" actionListener="#{payVchMngAction.showDetailListener}"
                           action="#{payVchMngAction.onShowDetail}">
                <f:attribute name="pkid" value="#{payVchMngAction.selectedRecord.pkid}"/>
            </h:commandLink>
        </h:form>
    </ui:define>

</ui:composition>